package com.kangyi.admin.mapper;

import com.github.pagehelper.Page;
import com.kangyi.admin.annotation.AutoFill;
import com.kangyi.dto.OperationPageQueryDTO;
import com.kangyi.entity.NursingHome;
import com.kangyi.enumeration.OperationType;
import com.kangyi.vo.OperationDetailVO;
import com.kangyi.vo.OperationPageQueryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @author Blank
 * @version 1.0
 */
@Mapper
public interface OperationSituationMapper {
    Page<OperationPageQueryVO> pageQuery(OperationPageQueryDTO operationPageQueryDTO);

    OperationDetailVO detailOperation(Integer nursingHomeId);

    @Update("update nursing_home set status = #{status}, update_time = #{updateTime}, update_user = #{updateUser} where id = #{id};")
    @AutoFill(value = OperationType.UPDATE)
    void modifyStatus(NursingHome build);
}
